package com.cc.model.convert

import com.cc.model.Quartz
import com.cc.model.dto.QuartzDto
import org.mapstruct.*

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
abstract class QuartzConvert {

    abstract fun toEntity(quartzDto: QuartzDto): Quartz

    abstract fun toDto(quartz: Quartz): QuartzDto

    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    abstract fun partialUpdate(quartzDto: QuartzDto, @MappingTarget quartz: Quartz): Quartz
}